<div id="navbar" class="navbar navbar-default">
	<script type="text/javascript">
		try{ace.settings.check('navbar' , 'fixed')}catch(e){}
	</script>

	<div class="navbar-container" id="navbar-container">
		<button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler">
			<span class="sr-only">Toggle sidebar</span> <span class="icon-bar"></span>
			<span class="icon-bar"></span> <span class="icon-bar"></span>
		</button>

		<div class="navbar-header pull-left">
			<a href="${ctx}/admin/account/dashboard" class="navbar-brand"> <small> <i
					class="fa fa-leaf"></i> FinalCMS Admin
			</small>
			</a>
		</div>

		<div class="navbar-buttons navbar-header pull-right"
			role="navigation">
			<ul class="nav ace-nav">
				<li class="light-blue">
					<a href="${url}" target="_blank" class="dropdown-toggle">网站首页</a>
				</li>
				<li class="light-blue">
					<a data-toggle="dropdown" href="#" class="dropdown-toggle"> 
						<img class="nav-user-photo" src="${ctx}/avatars/user.jpg"/> 
						<span class="user-info">
							<small>Welcome,</small>${session.current_user.login_name!""}
						</span> <i class="ace-icon fa fa-caret-down"></i>
					</a>
					<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
						<li><a href="#"> <i class="ace-icon fa fa-cog"></i>Settings</a></li>
						<li><a href="profile.html"><i class="ace-icon fa fa-user"></i>Profile</a></li>
						<li class="divider"></li>
						<li><a href="${ctx}/admin/account/logout"> <i class="ace-icon fa fa-power-off"></i>
								Logout
						</a></li>
					</ul>
				</li>
			</ul>
		</div>
	</div>
</div>
<div class="main-container" id="main-container">
<div id="sidebar" class="sidebar responsive">
	<ul class="nav nav-list">
		<li <?if(current=='dashboard'){?>class="active"<?}?> id="dashboard">
			<a href="${ctx}/admin/account/dashboard">
				<i class="menu-icon fa fa-tachometer"></i><span class="menu-text"> 仪表盘 </span>
			</a>
			<b class="arrow"></b>
		</li>
		
		<li <?if(current=='post_list' || current=='post_article' || current=='post_recycle'){?>class="active open hsub"<?}?>>
			<a href="#" class="dropdown-toggle">
				<i class="menu-icon fa fa-desktop"></i><span class="menu-text">	内容管理 </span> 
				<b class="arrow fa fa-angle-down"></b>
			</a>
			<b class="arrow"></b>
			<ul class="submenu">
				<li <?if(current=='post_list'){?>class="active"<?}?> >
					<a href="${ctx}/admin/post"><i class="menu-icon fa fa-caret-right"></i> 所有文章 </a>
				</li>
				<li <?if(current=='post_article'){?>class="active"<?}?> >
					<a href="${ctx}/admin/post/add"><i class="menu-icon fa fa-caret-right"></i> 写文章 </a>
				</li>
				<li <?if(current=='post_recycle'){?>class="active"<?}?> >
					<a href="${ctx}/admin/post/recylist"><i class="menu-icon fa fa-caret-right"></i> 回收站 </a>
				</li>
			</ul>
		</li>
		<li <?if(current=='category' || current=='category_add'){?>class="active open hsub"<?}?>>
			<a href="#" class="dropdown-toggle">
				<i class="menu-icon fa fa-file-o"></i><span class="menu-text">栏目管理</span>
				<b class="arrow fa fa-angle-down"></b>
			</a>	
			<b class="arrow"></b>
			<ul class="submenu">
				<li <?if(current=='category'){?>class="active"<?}?>>
					<a href="${ctx}/admin/category"><i class="menu-icon fa fa-caret-right"></i> 所有栏目</a>
				</li>
				<li <?if(current=='category_add'){?>class="active"<?}?>>
					<a href="${ctx}/admin/category/add"><i class="menu-icon fa fa-caret-right"></i> 添加</a>
				</li>
			</ul>
		</li>
		<li <?if(current=='block' || current=='block_add'){?>class="active open hsub"<?}?>>
			<a href="#" class="dropdown-toggle">
				<i class="menu-icon fa fa-file-o"></i><span class="menu-text">区块管理</span>
				<b class="arrow fa fa-angle-down"></b>
			</a>	
			<b class="arrow"></b>
			<ul class="submenu">
				<li <?if(current=='block'){?>class="active"<?}?>>
					<a href="${ctx}/admin/block"><i class="menu-icon fa fa-caret-right"></i> 所有区块</a>
				</li>
				<li <?if(current=='block_add'){?>class="active"<?}?>>
					<a href="${ctx}/admin/block/add"><i class="menu-icon fa fa-caret-right"></i> 添加</a>
				</li>
			</ul>
		</li>
		<li <?if(current=='friendlink' || current=='friendlink_add'){?>class="active open hsub"<?}?>>
			<a href="#" class="dropdown-toggle">
				<i class="menu-icon fa fa-file-o"></i><span class="menu-text">友情链接</span>
				<b class="arrow fa fa-angle-down"></b>
			</a>	
			<b class="arrow"></b>
			<ul class="submenu">
				<li <?if(current=='friendlink'){?>class="active"<?}?>>
					<a href="${ctx}/admin/friendlink"><i class="menu-icon fa fa-caret-right"></i> 所有友链</a>
				</li>
				<li <?if(current=='friendlink_add'){?>class="active"<?}?>>
					<a href="${ctx}/admin/friendlink/add"><i class="menu-icon fa fa-caret-right"></i> 添加</a>
				</li>
			</ul>
		</li>
		<li <?if(current=='site' || current=='param' || current=='param_add' || current=='account'){?>class="active open hsub"<?}?>>
			<a href="#" class="dropdown-toggle">
				<i class="menu-icon fa fa-file-o"></i><span class="menu-text">系统管理</span>
				<b class="arrow fa fa-angle-down"></b>
			</a>	
			<b class="arrow"></b>
			<ul class="submenu">
				<li <?if(current=='param'){?>class="active"<?}?>>
					<a href="${ctx}/admin/param"><i class="menu-icon fa fa-caret-right"></i> 所有参数</a>
				</li>
				<li <?if(current=='param_add'){?>class="active"<?}?>>
					<a href="${ctx}/admin/param/add"><i class="menu-icon fa fa-caret-right"></i> 添加参数</a>
				</li>
				<li <?if(current=='site'){?>class="active"<?}?>>
					<a href="${ctx}/admin/site"><i class="menu-icon fa fa-caret-right"></i> 站点信息</a>
				</li>
				<li <?if(current=='account'){?>class="active"<?}?>>
					<a href="${ctx}/admin/account"><i class="menu-icon fa fa-caret-right"></i> 用户管理</a>
				</li>
			</ul>
		</li>
	</ul>

	<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
		<i class="ace-icon fa fa-angle-double-left"
			data-icon1="ace-icon fa fa-angle-double-left"
			data-icon2="ace-icon fa fa-angle-double-right"></i>
	</div>

	<script type="text/javascript">
		try{ace.settings.check('sidebar' , 'collapsed')}catch(e){}
	</script>
</div>
